Package edu.uky.ai.lp.logic
Interface Formula
- All Known Subinterfaces:
Expression
- All Known Implementing Classes:
BooleanExpression,Conjunction,Constant,Disjunction,Fact,NAryBooleanExpression,Negation,Term,Variable
public interface Formula
Represents the superclass of all logical formulas.
- Author:
- Stephen G. Ware
-
Method Summary
Modifier and Type Method Description Formulasubstitute(Unifier unifier)Return a version of this formula with its variables replaced with the values assigned to them by a unifier.Unifierunify(Formula other, Unifier unifier)Unify this formula with another formula, adding to a given unifier as needed to make the two expression the same.
-
Method Details
-
unify
Unify this formula with another formula, adding to a given unifier as needed to make the two expression the same. The unifier passed in as an argument will not be modified; the (possibly extended) unifier is be returned by this method.- Parameters:
other- the other logical formula to unify withunifier- the unifier to extend- Returns:
- the new unifier that makes the two formulas the same, or null if they cannot unify
-
substitute
Return a version of this formula with its variables replaced with the values assigned to them by a unifier.- Parameters:
unifier- the unifier- Returns:
- the formula with variables replaced
-